
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../common/header.jsp"%>
<%@page import="java.util.List"%>
<%@ page import="com.zx.oa.entity.Student" %>
<%@ page import="com.zx.oa.entity.Major" %>
<%@ page import="com.zx.oa.entity.ClassInfo" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<script src="js/jquery-3.5.1.js" type="text/javascript"></script>
<style>
	.bbtt {
		margin-left: 87px;
		margin-top: 10px;
	}
</style>
<script>
	function confirmAct(){
		if(confirm('确定要执行删除操作吗?')){
			return true;
		}
		return false;
	}
</script>
<!-- appInfoList页面开始 -->
<div class="row">
	<div class="col-md-12 col-sm-12 col-xs-12">
		<div class="x_panel">
			<h2>
				晨考成绩统计<i class="fa fa-user"></i>
			</h2>
			<!--  -->
			<div class="x_content">
				<br />
				<form id="query" data-parsley-validate
					  class="form-horizontal form-label-left" method="post"
					  action="MoringexamServlet.do">
					<input type="hidden" name="pageIndex" value="1" />
					<input type="hidden" name="param" value="cha" />
					<input type="hidden" name="censusMoringWeek" value="1" />
					<ul style="list-style: none;">
						<li><label class="control-label col-md-3 col-sm-3 col-xs-12"
						>专业 </label>
							<div class="col-md-6 col-sm-6 col-xs-12">
								<select name="majorJsp" value="" id="majorJsp"
										class="form-control col-md-7 col-xs-12">
									<option value="">---请选择---</option>
											<c:forEach var="maj" items="${majorList }">
												<option value="${maj.major}" <c:if test="${param.majorJsp eq maj.major}">selected="selected"</c:if> }>${maj.major}</option>
											</c:forEach>
								</select>
							</div></li>
						<li>
							<div class="form-group">
								<label class="control-label col-md-3 col-sm-3 col-xs-12"
								>班级 </label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<select name="classnameJsp" id="classnameJsp" value=""
											class="form-control col-md-7 col-xs-12">
										<option value="">---请选择---</option>
										<c:forEach var="clist" items="${classInfoList }">
											<option value="${clist.className}"
												${param.classnameJsp==clist.className?'selected':''}>${clist.className}</option>
										</c:forEach>
									</select>
								</div>
							</div>
						</li>
						<br />
						<li>
							<div class="form-group">
								<div class="col-md-6 col-sm-6 col-xs-12">
									<button type="submit" class="btn btn-primary bbtt"
											class="btn btn-success ">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
								</div>
							</div>
						</li>
					</ul>
				</form>
				<!-- <form id="demo-form2" data-parsley-validate
					class="form-horizontal form-label-left" method="post"
					action="idServlet">
					<input type="hidden" name="pageIndex" value="1" />
					<ul style="list-style: none; display: inline_block;">
						<li>
							<div class="form-group">
								<label class="control-label col-md-3 col-sm-3 col-xs-12"
									for="first-name">学号查询 </label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" name="stuidc" id="querySoftWareName"
										class="form-control col-md-7 col-xs-12">
								</div>
								<button type="submit" class="btn btn-primary"
									class="btn btn-success">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
							</div>
						</li>
					</ul>
				</form>  -->
				<!--  		<li>
							<div class="form-group">
								<label class="control-label col-md-3 col-sm-3 col-xs-12"
									for="first-name">软件名称 </label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<input type="text" name="querySoftWareName"
										id="querySoftWareName" class="form-control col-md-7 col-xs-12">
								</div>
							</div>
						</li>
						-->
				<!--  	<li>
							<div class="form-group">
								<label class="control-label col-md-3 col-sm-3 col-xs-12"
									for="last-name">APP状态 </label>
								<div class="col-md-6 col-sm-6 col-xs-12">
									<select name="queryStatus"
										class="form-control col-md-7 col-xs-12">
<%--										<c:if test="${classInfoList!=null}">--%>
<%--											<option value="">---请选择---</option>--%>
<%--											<c:forEach var="classInfo" items="${classInfoList}">--%>
<%--												<option--%>
<%--													<c:if test="${dataDictionary.valueId==queryStatus}">selected="selected"</c:if>--%>
<%--													value="${dataDictionary.valueId}">${dataDictionary.valueName}</option>--%>
<%--											</c:forEach>--%>
<%--										</c:if>--%>
									</select>
								</div>
							</div></li>

						<li>
							<div class="form-group">
								<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<button type="submit" class="btn btn-primary"
										class="btn btn-success">查&nbsp;&nbsp;&nbsp;&nbsp;询</button>
								</div>
							</div></li>
					</ul>
				</form>
				-->
			</div>
			<!--   -->
		</div>
	</div>
	<!-- 表格 -->
	<div class="col-md-12 col-sm-12 col-xs-12">
		<div class="x_panel">
<%--			<a href="${ctx}/MoringexamServlet.do?param=setResult&&result=差&&census=1" class="btn btn-success btn-sm">差</a>--%>
<%--			<a href="${ctx}/MoringexamServlet.do?param=setResult&&result=中等&&census=1" class="btn btn-success btn-sm">中等</a>--%>
<%--			<a href="${ctx}/MoringexamServlet.do?param=setResult&&result=好&&census=1" class="btn btn-success btn-sm">好</a>--%>
<%--			<a href="${ctx}/MoringexamServlet.do?param=setResult&&result=非常好&&census=1" class="btn btn-success btn-sm">非常好</a>--%>
			<input type="submit" class="btn btn-success btn-sm" name="result" value="差">
			<input type="submit" class="btn btn-success btn-sm" name="result" value="中等">
			<input type="submit" class="btn btn-success btn-sm" name="result" value="好">
			<input type="submit" class="btn btn-success btn-sm" name="result" value="非常好">
			<c:if test="${! empty studentList}">
				<table id="datatable" class="table table-striped table-bordered">
					<tr>
						<th>学号</th>
						<th>培训专业</th>
						<th>班级名称</th>
						<th>学生姓名</th>
					</tr>
					<%
						List<Student> studentList= (List<Student>) request.getAttribute("studentList");
						for (Student stu: studentList){
					%>
						<%--					<c:forEach var="stu" items="${ studentList }">--%>
					<tr>
						<td>
							<input type="checkbox" name="duo" value="<%=stu.getStudentId()%>">
							<%=stu.getStudentId()%></td>
						<td><%=stu.getMajor()%></td>
						<td><%=stu.getClassName()%></td>
						<td><%=stu.getStudentName()%></td>
					</tr>
						<%--					</c:forEach>--%>
					<%}%>
					<tr>
						<td colspan="10" style="text-align: right;"><span>共有${pageInfo.totalCount }条数据，${pageInfo.currentPageNo }/${pageInfo.totalPageCount }页</span>
								<%--							<a--%>
								<%--							href="chaservlet?namec=${Name==null?'':Name}&classname=${classname==null?'':classname}&major=${major==null?'':major}&pageIndex=1">首页</a>&nbsp;--%>
								<%--							<a--%>
								<%--							href="chaservlet?namec=${Name==null?'':Name}&classname=${classname==null?'':classname}&major=${major==null?'':major}&pageIndex=${pageInfo.currentPageNo-1}">上一页</a>&nbsp;--%>
								<%--							<a--%>
								<%--							href="chaservlet?namec=${Name==null?'':Name}&classname=${classname==null?'':classname}&major=${major==null?'':major}&pageIndex=${pageInfo.currentPageNo+1}">下一页</a>&nbsp;--%>
								<%--							<a--%>
								<%--							href="chaservlet?namec=${Name==null?'':Name}&classname=${classname==null?'':classname}&major=${major==null?'':major}&pageIndex=${pageInfo.totalPageCount}">末页</a>--%>
							<a href="javascript:page_nav(document.forms[0],1);">首页</a>&nbsp;
							<a href="javascript:page_nav(document.forms[0],${pageInfo.currentPageNo}-1);">上一页</a>&nbsp;
							<a href="javascript:page_nav(document.forms[0],${pageInfo.currentPageNo}+1);">下一页</a>&nbsp;
							<a href="javascript:page_nav(document.forms[0],${pageInfo.totalPageCount});">末页</a>&nbsp;
						</td>
					</tr>
				</table>
			</c:if>
		</div>
	</div>


	<c:if test="${ empty studentList }">
		<h1>没有学生信息</h1>
	</c:if>
	<!-- 表格 -->
	<!-- 分页 -->
	<div class="row">
		<div class="col-sm-7">
			<div class="dataTables_paginate paging_simple_numbers"
				 id="datatable-responsive_paginate">
				<ul class="pagination">
					<%--					<c:if test="${pages.currentPageNo > 1}">--%>
					<li class="paginate_button previous"><a
							href="javascript:page_nav(document.forms[0],1);"
							aria-controls="datatable-responsive" data-dt-idx="0" tabindex="0">首页</a>
					</li>
					<li class="paginate_button "><a
							href="javascript:page_nav(document.forms[0],${pageInfo.currentPageNo-1});"
							aria-controls="datatable-responsive" data-dt-idx="1" tabindex="0">上一页</a>
					</li>
					<%--					</c:if>--%>
					<%--					<c:if test="${pages.currentPageNo < pages.totalPageCount }">--%>
					<li class="paginate_button "><a
							href="javascript:page_nav(document.forms[0],${pageInfo.currentPageNo+1 });"
							aria-controls="datatable-responsive" data-dt-idx="1" tabindex="0">下一页</a>
					</li>
					<li class="paginate_button next"><a
							href="javascript:page_nav(document.forms[0],${pageInfo.totalPageCount });"
							aria-controls="datatable-responsive" data-dt-idx="7" tabindex="0">最后一页</a>
					</li>
					<%--					</c:if>--%>
				</ul>
			</div>
		</div>
	</div>
	<!-- 分页 -->
</div>

<!-- appInfoList页面结束 -->
<!-- /page content -->
<%@ include file="../common/footer.jsp"%>
<script src="${ctx }/statics/localjs/appinfoList.js"></script>
<script src="${pageContext.request.contextPath}/statics/localjs/rollpage.js"></script>

